package miiteen.customsportal.popup.controller;

import miiteen.common.json.JsonUtil;
import miiteen.sys.base.controller.BaseAction;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping(value = "/demo/popup")
public class PopupDemoController extends BaseAction {

    @RequestMapping(value = "/edit")
    public ModelAndView edit() {
        ModelAndView mv = new ModelAndView("customsportal/popup/popupEdit");


        //返回对象JSON字符串
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("accountName", "");
        map.put("roleName","");
        mv.addObject("popup", JsonUtil.toJsonStr(map));
        return mv;
    }
}
